<template>
  <div class="mod-config">
    <table-view ref="view"
                :searchAttrs="searchAttrs"
                :primaryKey="primaryKey"
                :listApiName="listApiName"
                :deleteApiName="deleteApiName"
                :exportApiName="exportApiName"
                :saveAuthName="saveAuthName"
                :deleteAuthName="deleteAuthName"
                :showAttrs="showAttrs"
    >
    </table-view>
    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  </div>
</template>


<script>
import tableView from '@/components/tableView'
import basicMixins from '@/utils/commonViewMixins'
import AddOrUpdate from './financereversalrecords-add-or-update'

export default {
  mixins: [basicMixins],
  data() {
    return {
      primaryKey: 'id',
      listApiName: 'financeApi/listFinanceReversalRecords',
      deleteApiName: 'financeApi/deleteFinanceReversalRecords',
      exportApiName: 'financeApi/getFinanceReversalRecordsExport',
      saveAuthName: 'finance:financereversalrecords:save',
      deleteAuthName: 'finance:financereversalrecords:delete',
      searchAttrs: {},
      showAttrs: {
        redBusinessType: {
          label: '红冲业务'
        },
        productId: {
          label: '产品ID'
        },
        productNo: {
          label: '产品编号'
        },
        orderDetailId: {
          label: '订单ID'
        },
        productLeaveId: {
          label: '产品出库单'
        },
        clientId: {
          label: '客户ID'
        },
        boxAddId: {
          label: '纸箱入库单'
        },
        boxFactoryId: {
          label: '纸箱厂ID'
        },
        weighDetailInfoId: {
          label: '过磅记录单'
        },
        supplierId: {
          label: '供应商ID'
        },
        financeTransactionProductId: {
          label: '财务往来商品记录'
        },
        financeTransactionIngredientId: {
          label: '财务往来原料记录'
        },
        reversalType: {
          label: '红冲类型 0冲增、1冲减'
        },
        totalPrice: {
          label: '总金额'
        },
        unitPrice: {
          label: '单价'
        },
        reversalNumber: {
          label: '数量'
        },
        remark: {
          label: '原因备注'
        },
        reversalImageUrl: {
          label: '图片保存'
        },
        dayTime: {
          label: '红冲时间'
        },
        status: {
          label: '状态'
        },
      }
    }
  },
  components: {
    tableView,
    AddOrUpdate
  }
}
</script>
